package engine.newUi
{
	import engine.control.loading.MultLoader;
	import engine.data.ResPath;
	import engine.flag.ResourcesPath;
	import engine.ui.lite.BaseUI;
	
	import flash.display.DisplayObjectContainer;
	import flash.display.MovieClip;
	
	import newx.com.config.StaticIni;
	import newx.com.control.NxClip;
	import newx.com.control.button.NxButton;
	import newx.com.control.group.NxViewGroup;
	import newx.com.control.text.NxLabel;
	
	/**
	 * 江湖—产业
	 * @author zhouqiang
	 * 
	 */	
	public class IndustryUI extends BaseUI
	{
		//public static var _self:IndustryUI;
		
		public var itemGroup:NxViewGroup;
		
		public var shuaxin:NxButton;
		/***/
		public var goodsLab:NxLabel;
		
		/***/
		public var LevelLab:NxLabel;
		
		public var titLab:NxLabel;
		
		public var txt1:NxLabel;
		
		public var txt2:NxLabel;
		
		public var NameLab:NxLabel;
			
		/**货物个数图*/
		public var accountBook:NxClip;
			
		/**图像背景图*/
		public var headBack:MovieClip;
		
		/**图像背景图*/
		public var back1:MovieClip;
		
		/**图像背景图*/
		public var back2:MovieClip;
		
		
		/**图像背景图*/
		public var bgback:MovieClip;
		/**生意加成百分比*/
		public var addBar:MovieClip;
		
		/**开始经营按钮*/
		public var beginBtn:NxButton;
		
		/**添加货物*/
		public var addbtn:NxButton;
				
		/**产业升级按钮*/
		public var upBtn:NxButton;
		
		/**招揽顾客按钮*/
		//public var solicitBtn:NxButton;
		
		/**产业图片容器*/
		public var	houseClip:NxClip;
		
		/**头像容器*/
		public var headClip:NxClip;
		
		/***/
		public var thingsLab:NxLabel;
		
		public var adddbtn:NxButton;
		public var timeLab:NxLabel;
		
		
		/**收获按钮*/
		public var resultsBtn:NxButton;
		
		/**礼物文本*/
		public var txtLab_0:NxLabel;
		public var txtLab_1:NxLabel;
		public var txtLab_2:NxLabel;
		public var txtLab_3:NxLabel;
		public var txtLab_4:NxLabel;
		
		public var vipBtn:NxButton;
		
		public var titBack:MovieClip;
		public var lineBack:MovieClip;
		public var sign_0:MovieClip;
		public var sign_1:MovieClip;
		public var sign_2:MovieClip;
		public var sign_3:MovieClip;
		
		public var effect:MovieClip;
		
		/**刷新成功特效*/
		public var upEffect:MovieClip;
		
		/**刷新成功特效*/
		public var houseEffect:MovieClip;
		public function IndustryUI(popupUI:Boolean=true)
		{
			super(popupUI);
		}
				
		override public function Init():void
		{
//			//LevelLab.htmlText	=	"青楼";
//			txtLab_0.htmlText	=	StaticIni.getSwfLangStr("UIString_1000204");
//			txtLab_1.htmlText	=	StaticIni.getSwfLangStr("UIString_1000205");
//			txtLab_2.htmlText	=	StaticIni.getSwfLangStr("UIString_1000206");
//			txtLab_3.htmlText	=	StaticIni.getSwfLangStr("UIString_1000207");
//			txtLab_4.htmlText	=	StaticIni.getSwfLangStr("UIString_1000208");
			IndustryLogic.getInstance().Init();
			effect.visible = false;
			houseClip.visible = false;
		}
		
		override protected function BeforeShow():void
		{
			IndustryLogic.getInstance().BeforeShow();	
		}
		
		override protected function AfterHide():void
		{
			IndustryLogic.getInstance().AfterHide();	
		}
		
		override public function show(space:DisplayObjectContainer=null, onshow:Function=null, ...argc):void
		{
			if(!MultLoader.getInstance().getSourceByUrl(ResPath.SWF + "IndustryHouse.swf"))
			{
				MultLoader.getInstance().load([ResPath.SWF + "IndustryHouse.swf"],true,createImage);
			}else
			{
				createImage();
			}
		}
		
		private function createImage():void
		{
			super.show();
		}
	}
}